import request from '@/utils/request'

export function getAllItemAPI(obj) {
  return request({
    url: '/getAllItem',
    method: 'GET',
    params: obj
  })
}
export function getMyItemAPI() {
  return request({
    url: '/getMyItem',
    method: 'GET'
  })
} export function getMyCartAPI() {
  return request({
    url: '/getMyCart',
    method: 'GET'
  })
}

export function addItemAPI(data) {
  return request({
    url: '/addItem',
    method: 'POST',
    data: data
  })
}

export function upLoadAPI(data) {
  return request({
    url: '/upLoad',
    method: 'POST',
    data: data
  })
}
export function deleteItemAPI(obj) {
  return request({
    url: '/deleteItem',
    method: 'DELETE',
    params: obj
  })
}
export function deleteCartItemAPI(obj) {
  return request({
    url: '/deleteCartItem',
    method: 'DELETE',
    params: obj
  })
}
export function addCartAPI(data) {
  return request({
    url: '/addCart',
    method: 'POST',
    data: data
  })
}
